Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands: handle ctrl-c on active prompt #2289

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

tonistiigi
Copy link
Member

fix #2240

With recent changes, the global cobra context is passed to all commands what usually is correct, but in this case the prompt library does not provide support for cancellation.

Note that although the new function supports cancellation, it does not leave the reader in a clean state. Internally the prompt function uses bufio reader so it is unknown how many bytes it has read and how much data it has dropped once the prompt function returns.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi added this to the v0.13.0 milestone Feb 28, 2024
@tonistiigi tonistiigi merged commit e705caf into docker:master Feb 28, 2024
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker buildx prune require 3x CTRL-C to cancel
2 participants